Sign Up

Sign Up to our social questions and Answers Engine to ask questions, answer people’s questions, and connect with other people.

Have an account? Sign In

Have an account? Sign In Now

Sign In

Login to our social questions & Answers Engine to ask questions answer people’s questions & connect with other people.

Sign Up Here

Forgot Password?

Don't have account, Sign Up Here

Forgot Password

Lost your password? Please enter your email address. You will receive a link and will create a new password via email.

Have an account? Sign In Now

You must login to ask a question.

Forgot Password?

Need An Account, Sign Up Here

Please briefly explain why you feel this question should be reported.

Please briefly explain why you feel this answer should be reported.

Please briefly explain why you feel this user should be reported.

Sign InSign Up

The Archive Base

The Archive Base Logo The Archive Base Logo

The Archive Base Navigation

  • SEARCH
  • Home
  • About Us
  • Blog
  • Contact Us
Search
Ask A Question

Mobile menu

Close
Ask a Question
  • Home
  • Add group
  • Groups page
  • Feed
  • User Profile
  • Communities
  • Questions
    • New Questions
    • Trending Questions
    • Must read Questions
    • Hot Questions
  • Polls
  • Tags
  • Badges
  • Buy Points
  • Users
  • Help
  • Buy Theme
  • SEARCH
Home/ Questions/Q 6064891
In Process

The Archive Base Latest Questions

Editorial Team
  • 0
Editorial Team
Asked: May 23, 20262026-05-23T09:19:47+00:00 2026-05-23T09:19:47+00:00

[ServiceContract(Namespace = http://schemas.mycompany.com/, Name = MyService)] public interface IMyService { [OperationContract(Name = MyOperation) OperationResponse

  • 0
[ServiceContract(Namespace = "http://schemas.mycompany.com/", Name = "MyService")]
public interface IMyService
{
    [OperationContract(Name = "MyOperation")
    OperationResponse MyOperation(OperationRequest request);
}

In this scenario, what is the point of the Action and ReplyAction ?


Edit: I should clarify my question…

How would my wsdl differ if I don’t specify these parts? Won’t it just use some combination of the namespace, service name and opeartion name anyways?

  • 1 1 Answer
  • 0 Views
  • 0 Followers
  • 0
Share
  • Facebook
  • Report

Leave an answer
Cancel reply

You must login to add an answer.

Forgot Password?

Need An Account, Sign Up Here

1 Answer

  • Voted
  • Oldest
  • Recent
  • Random
  1. Editorial Team
    Editorial Team
    2026-05-23T09:19:47+00:00Added an answer on May 23, 2026 at 9:19 am

    You only need the Action / ReplyAction properties if you want to customize those values in the messages (and they’re reflected in the WSDL). If you don’t have them, the default is <serviceContractNamespace> + <serviceContractName> + <operationName> for the Action, and <serviceContractNamespace> + <serviceContractName> + <operationName> + "Response" for ReplyAction.

    The code below prints out the Action/ReplyAction properties of all operations in the service.

    public class StackOverflow_6470463
    {
        [ServiceContract(Namespace = "http://schemas.mycompany.com/", Name = "MyService")]
        public interface IMyService
        {
            [OperationContract(Name = "MyOperation")]
            string MyOperation(string request);
        }
        public class Service : IMyService
        {
            public string MyOperation(string request) { return request; }
        }
        public static void Test()
        {
            string baseAddress = "http://" + Environment.MachineName + ":8000/Service";
            ServiceHost host = new ServiceHost(typeof(Service), new Uri(baseAddress));
            host.AddServiceEndpoint(typeof(IMyService), new BasicHttpBinding(), "");
            host.Open();
            Console.WriteLine("Host opened");
    
            foreach (ServiceEndpoint endpoint in host.Description.Endpoints)
            {
                Console.WriteLine("Endpoint: {0}", endpoint.Name);
                foreach (var operation in endpoint.Contract.Operations)
                {
                    Console.WriteLine("  Operation: {0}", operation.Name);
                    Console.WriteLine("    Action: {0}", operation.Messages[0].Action);
                    if (operation.Messages.Count > 1)
                    {
                        Console.WriteLine("    ReplyAction: {0}", operation.Messages[1].Action);
                    }
                }
            }
    
            Console.Write("Press ENTER to close the host");
            Console.ReadLine();
            host.Close();
        }
    }
    
    • 0
    • Reply
    • Share
      Share
      • Share on Facebook
      • Share on Twitter
      • Share on LinkedIn
      • Share on WhatsApp
      • Report

Sidebar

Related Questions

We have an existing ServiceContract [ServiceContract(Namespace = http://somesite.com/ConversationService)] public interface IConversationService { [OperationContract(IsOneWay =
We've got the following WCF Service Contracts: [ServiceContract(Namespace = http://example.com, Name = Service1)] public
I have the following: [ServiceContract] [ServiceKnownType(typeof(ActionParameters))] [ServiceKnownType(typeof(SportProgram))] [ServiceKnownType(typeof(ActionResult<SportProgram>))] public interface ISportProgramBl { [OperationContract] IActionResult<ISportProgram>
I have defined the following Interface [ServiceContract] public interface IHealthProducts { [OperationContract()] ResponseClass OrderSelfSignedHealthCertificate();
I understand I can apply several options to the ServiceContract (like Name , Namespace
I am using a HashSet in my WCF interface [ServiceContract] public interface IwcfServerSync {
Let's say I have a WCF contract such as [ServiceContract] public interface IContract {
I have a service with multiple contracts like so. [ServiceContract] public partial interface IBusinessFunctionDAO
I have a WCF webservice that has the following service contract [ServiceContract(Namespace = http://example.org)]
Please find below my code. Employee class implements IEmployee interface. namespace MiddleWare.ServiceContracts { [ServiceContract(Namespace

Explore

  • Home
  • Add group
  • Groups page
  • Communities
  • Questions
    • New Questions
    • Trending Questions
    • Must read Questions
    • Hot Questions
  • Polls
  • Tags
  • Badges
  • Users
  • Help
  • SEARCH

Footer

© 2021 The Archive Base. All Rights Reserved
With Love by The Archive Base

Insert/edit link

Enter the destination URL

Or link to existing content

    No search term specified. Showing recent items. Search or use up and down arrow keys to select an item.